<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    Array.prototype.max=function(){
        let max=this[0]
        for(let i=1;i<this.length;i++){
            if(max<this[i]){
                max=this[i]
            }
        }
        console.log(max);
    }
    let arr=[1,2,3,4,9,8]
    arr.max()
</script>
</html>